//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.dto.auth;

import com.itheima.pinda.authority.base.entity.SuperEntity.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

@ApiModel(
        value = "UserUpdateDTO",
        description = "用户"
)
public class UserUpdateAvatarDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("主键")
    @NotNull(
            message = "id不能为空",
            groups = {Update.class}
    )
    private Long id;
    @ApiModelProperty("头像")
    @Length(
            max = 255,
            message = "头像长度不能超过255"
    )
    private String avatar;

    public static UserUpdateAvatarDTO.UserUpdateAvatarDTOBuilder builder() {
        return new UserUpdateAvatarDTO.UserUpdateAvatarDTOBuilder();
    }

    public Long getId() {
        return this.id;
    }

    public String getAvatar() {
        return this.avatar;
    }

    public UserUpdateAvatarDTO setId(final Long id) {
        this.id = id;
        return this;
    }

    public UserUpdateAvatarDTO setAvatar(final String avatar) {
        this.avatar = avatar;
        return this;
    }

    public UserUpdateAvatarDTO() {
    }

    public UserUpdateAvatarDTO(final Long id, final String avatar) {
        this.id = id;
        this.avatar = avatar;
    }

    public String toString() {
        return "UserUpdateAvatarDTO(super=" + super.toString() + ", id=" + this.getId() + ", avatar=" + this.getAvatar() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof UserUpdateAvatarDTO)) {
            return false;
        } else {
            UserUpdateAvatarDTO other = (UserUpdateAvatarDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$id = this.getId();
                Object other$id = other.getId();
                if (this$id == null) {
                    if (other$id != null) {
                        return false;
                    }
                } else if (!this$id.equals(other$id)) {
                    return false;
                }

                Object this$avatar = this.getAvatar();
                Object other$avatar = other.getAvatar();
                if (this$avatar == null) {
                    if (other$avatar != null) {
                        return false;
                    }
                } else if (!this$avatar.equals(other$avatar)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof UserUpdateAvatarDTO;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $avatar = this.getAvatar();
        result = result * 59 + ($avatar == null ? 43 : $avatar.hashCode());
        return result;
    }

    public static class UserUpdateAvatarDTOBuilder {
        private Long id;
        private String avatar;

        UserUpdateAvatarDTOBuilder() {
        }

        public UserUpdateAvatarDTO.UserUpdateAvatarDTOBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public UserUpdateAvatarDTO.UserUpdateAvatarDTOBuilder avatar(final String avatar) {
            this.avatar = avatar;
            return this;
        }

        public UserUpdateAvatarDTO build() {
            return new UserUpdateAvatarDTO(this.id, this.avatar);
        }

        public String toString() {
            return "UserUpdateAvatarDTO.UserUpdateAvatarDTOBuilder(id=" + this.id + ", avatar=" + this.avatar + ")";
        }
    }
}
